<template>
    <div>
        <ul class="mui-table-view">
            <li class="mui-table-view-cell mui-media">
                <router-link to="/home/newsinfo/13">
                    <img class="mui-media-object mui-pull-left" 
                    src="https://gitee.com/uploads/63/1962963_songshiquan.png?1527583538">
                    <div class="mui-media-body">
                        幸福
                        <p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
                    </div>
                </router-link>
            </li>
            <li class="mui-table-view-cell mui-media">
                <a href="javascript:;">
                    <img class="mui-media-object mui-pull-left"
                     src="https://gitee.com/uploads/63/1962963_songshiquan.png?1527583538">
                    <div class="mui-media-body">
                        木屋
                        <p class='mui-ellipsis'>想要这样一间小木屋，夏天挫冰吃瓜，冬天围炉取暖.</p>
                    </div>
                </a>
            </li>
            <li class="mui-table-view-cell mui-media">
                <a href="javascript:;">
                    <img class="mui-media-object mui-pull-left" 
                    src="https://gitee.com/uploads/63/1962963_songshiquan.png?1527583538">
                    <div class="mui-media-body">
                        CBD
                        <p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
                    </div>
                </a>
            </li>
        </ul>
    </div>
</template>

<script>
import { Toast } from 'mint-ui'

export default {
    data() {
        return {
            newslist:[]
        }
    },
    methods:{
        getNewList() {
            //获取新闻列表
            this.$http.get("api/getnewslist").then(result=>{
                if(result.body.status===0) {
                    //成功，应该吧数据保存到data上
                    this.newslist=result.body.message;
                }else {
                    Toast('获取新闻列表失败')
                }
            })
        }
    }
}
</script>

<style lang="scss" scoped>

</style>
